package com.zy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.zy.entity.DepartmentPosition;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface DepartmentPositionMapper extends BaseMapper<DepartmentPosition> {

    @Select("SELECT post_id,post_name,department_name FROM department de,(SELECT post_id,post_name,department_id did FROM (SELECT post_id pid,post_name FROM post) po,post_department_mapping ma WHERE po.pid=ma.post_id and ma.department_id!=9) post  WHERE post.did=de.department_id")
    public List<DepartmentPosition> getDepartmentPositionList();
}
